
// tab 切换
function tabSwitch(id){
	var aLi = $('#'+id).find('.tab_nav_a')
	var aDiv = $('#'+id).find('.tab_plan')

	
	for(var i=0; i<aLi.length; i++){

		aLi[i].index=i;
		$(aLi).click(function(){ 

			$(aLi).attr('class','tab_nav_a');
			$(aDiv).hide();	


			$(this).attr('class','tab_nav_a active');
			$(aDiv[this.index]).show()

		});
	}
}


var layer_loading;
function loading_show(){
	layer_loading = layer.open({type: 2,shade: 'background-color: rgba(0,0,0,.3)'});
}
function loading_hide(){
	if(layer_loading != 'undefined'){
		layer.close(layer_loading);
	}
}
function layer_msg(msg){
	layer.open({
		content: msg
		,skin: 'msg'
		,time: 1.5 //2秒后自动关闭
	});
}















